Summary

Inserts menu based on an xml-source or auto generated from a document hierarchy.

The menu is based on only html and css and is therefore accessible.

Component properties
Category AS Menu
Version 3.2
Complies with Xhtml 1.0 / 1.1 rules Yes
Supported server programming languages C# Visual Basic.NET
Output content type block

When to use

This component is typically used to build a menu on a Web site.

Using your own xml source

With this component it is possible to use your own Xml source for the menu. This can be a good idea if the menu seldom changes and the menu does not care about user security. The performance can benefit from this since the menu never need to be rendered through the Content Studio menu API but will be more difficult to change and will most likely require developer skills.

The source can be any http document that returns xml or can be the Xml string directly. The syntax is the same as the return value from the MenuCreator.GetXmlMenu API.
A sample of this Xml can be found in the code block below:

Source xml sample.

Fine grained control over menu items

You can create your menu in such a way the each menu item is the document itself to be displayed or you can have the menu item to act as a link to another document. If you choose the link method you can have fine grained control over each link to be formed through the url, data and target property of each menu item. These properties can be edited directly within Content Studio in the document settings dialog that can be found within the Webitor. The three properties have the following function:

Url
Defines the link destination (HREF) of the link generated by the menu
Target
Defines the TARGET attribute of the link generated. Target is not allowed in the strict DOCTYPES and will be rendered as javascript for these types. Remember that targets are not valid on all types of clients such as mobile devices and can cause problems when accessibility is important.
Data
Custom text data for the link. Not often used but this data is written out directly in the link before the displayed text.

Customizing

The menu is rendered using a xsl stylesheet Insert menu 3.0 XSL, located in System/Stylesheets/Protected. This xsl stylesheet may be modified but it is recommended to make a copy of it and specifying the new document in MenuXSL property.

Programming interface

Parameters

Select a document id in CS...
Document id
Select root document that will act as the root document of the meny hierarchy. This value is ignored if HTTP Source or String Source is set.
Presentation template id
An optional presentation template that will be used in each link generated.
Or select an external xml source
HTTP Source
An Http, UNC or relative Http custom xml source of the menu.
String source
An string that contains the the Xml source to use.
Menu name
The name of the menu. This name must be unique in Web site.
Cache methods
  • No cache
    Do not cache the menu, the menu will be rendered from the specified source each time it reloads.
  • Use session cache
    Cache menu using session variables. Recommended for intranets where different menu items are visible for different users, for example when security permissions are set for menus items.
  • Use application cache
    Cache the menu using application cache. Recommenden on public web sites.
Do not use cache in admin
Do not use application or session cache in Content Studio Admin.
Application cache timeout
Timeout, in minutes, for the application cache. Zero (0) indicates that the cache is valid indefinitely or until the Web site is restarted.
Menu settings
DisplayRoot
Indicates that the root of the menu should be visible. Normally this item is hidden and is primarily ment to act as a placeholder.
HooverMenu
Indicates that the menu will be displayed as hoovering menu that floates above the text.
ClickableRoots
Normally only the leaf objects in the menu is clickable, the folders are only used as containers for its children. This option will make also the containers appear clickable.
EnableViewState
Enable view state. This option is not available for a custom xml source.
Use smart menu rendering
This parameter is not supported for CS running on SQL Server 2000. If this parameter is set this method will only return the relevant part of the document hierchy. E.g. The document itself, its immidiate children. Furthermore, a check is performed to see which of thoose documents that have children themselves. By supplying this parameter, the performance can increase several times depending how large the hierarchy is. This parameter is only useful when rendering menues that has a tree lookalike style.
Perform access check
This parameter is not supported for CS running on SQL Server 2000. This method does not return any sensitive information, therefore it is possible to turn off the access check for each document in the hierachy to increase the performance.
Use publish status
This parameter is not supported for CS running on SQL Server 2000. By setting this parameter to false publish date, archivedate and published will be ignored which increases performance.
Marking settings
DeafultParentField
Fieldname for the documentID of a document that should be marked. Available in presentation templates only.
DocumentToMarkIfNotFound
If the document is not in the hierarchy, this document will be marked? This option is not available for a custom xml source. 
OverrideCookie
When this option is set, the cookie that remember the last menu item marked will be ignored.
Display settings
DisplayParent
Display the parent object. This options is normally true.
RootLevels
Optional, a comma separated list of levels that will will build own roots. Ex: 2, 3, 5, 7, not avaliable for custom xml source
ParentLinkText
Optional,  the text for a parent link
ParentTagName
The tag name for the container of the link to a parent document.
Target
A name that will act as the default target for all links
CSS and xsl settings
MenuCSSClassPrefix
This text is used as prefix for all classes in the menu. Standard Prefix you can use are:
  • CS_DefaultTreeMenu
  • CS_DefaultHorizontalMenu
  • CS_DefaultVerticalMenu
MenuXSL
A URL to to own xsl stylesheet that renders the menu xml source.
IEBehaviour
A URL to a Behaviour to use with Internet Explorer
IEBehaviourClassName
A CSS class name that defines the Internet Explorer hoover effects.

Remarks

 The difference between the Insert menu 3.0 and Insert menu 2.0 is that the former uses a list with UL / LI elements styled by CSS while the latter uses a TABLE element with JavaScript. Insert menu 2.0 should only be used for backward compatibility reasons.

General remarks with menu components

All menu driven components uses the Content Studio menu API:s and hierarchy document structures. The caller must have BROWSE permission to all items displayed and every item must be live and published. When the menu renders Content Studio traverses through the entire document tree and whenever there is a document that is not available to the caller the traverse operation breaks at this point. This have the effect that any object that is a child of a unavailable document will be left out since the tree is broken at that point.